﻿Imports Microsoft.VisualBasic
Imports System.Data
Public Class DBtblFilesSP
    Inherits DBParentStoredProcedureClass

    Public Operation As New TableField("Operation", SqlDbType.NVarChar)
    Public FileID As New TableField("FileID", SqlDbType.Int)
    Public Voucher_IDC As New TableField("Voucher_IDC", SqlDbType.NVarChar)
    Public Voucher_IDN As New TableField("Voucher_IDN", SqlDbType.Int)
    Public Name As New TableField("Name", SqlDbType.NVarChar)
    'Public Admin As New TableField("Admin", Data.SqlDbType.Bit)
    Public ContentType As New TableField("ContentType", SqlDbType.NVarChar)
    Public Data As New TableField("Data", SqlDbType.VarBinary)

    Sub New()
        MyBase.StoredProcedureName = "tblFilesSP"
    End Sub

    Public Shadows Function QueryDatabase(ByVal QueryType As SqlQueryType, _
                                 Optional ByVal Operation As String = "", _
                                 Optional ByVal FileID As String = "", _
                                 Optional ByVal Voucher_IDC As String = "", _
                                 Optional ByVal Voucher_IDN As String = "", _
                                 Optional ByVal Name As String = "", _
                                 Optional ByVal ContentType As String = "", _
                                 Optional ByVal Data As String = "") As Object
        MyBase.FieldsArrayList = New ArrayList
        Me.Operation.SetValue(Operation, MyBase.FieldsArrayList)
        Me.FileID.SetValue(FileID, MyBase.FieldsArrayList)
        Me.Voucher_IDC.SetValue(Voucher_IDC, MyBase.FieldsArrayList)
        Me.Voucher_IDN.SetValue(Voucher_IDN, MyBase.FieldsArrayList)
        Me.Name.SetValue(Name, MyBase.FieldsArrayList)
        'Me.Admin.SetValue(Admin, MyBase.FieldsArrayList)
        Me.ContentType.SetValue(ContentType, MyBase.FieldsArrayList)
        Me.Data.SetValue(Data, MyBase.FieldsArrayList)

        Return MyBase.QueryDatabase(QueryType)
    End Function


End Class
